<?php
$this->breadcrumbs=array(
	'Tai Khoans'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'Danh sách', 'url'=>array('index'), 'itemOptions'=>array('class'=>'li-index')),
	array('label'=>'Thêm mới', 'url'=>array('create'), 'itemOptions'=>array('class'=>'li-add')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('tai-khoan-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'tai-khoan-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'Id',
		'TaiKhoan',
		'MatKhau',
		'Salt',
		'Email',
		array(
			'name'=>'TrangThai',
			    'filter'=>array(1=>"Hiển thị",0=>"Không hiển thị"),
				'value'=>'$data->TrangThai == 0 ? "Không hiển thị" : "Hiển thị"',		    
		),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
